import adminConfig from '@/admin.config.js'
export default {
  namespaced: true,
  state: {},
  getters: {},
  mutations: {},
  actions: {
    list(_, data) {
      return uni.request({
        url: '/unify/menu/index',
        data
      })
    },
    form(_, data = {}) {
      return uni.request({
        url: '/unify/menu/form',
        data
      })
    },
    save(_, data = {}) {
      return uni.request({
        url: `/unify/menu/${data.id?'update':'save'}`,
        data
      })

    },
    updateField(_, data) {
      return uni.request({
        url: `/unify/menu/updateField`,
        data
      })
    },
    read(_, data) {
      return uni.request({
        url: `/unify/menu/read`,
        data
      })
    },
    delete(_, data) {
      return uni.request({
        url: `/unify/menu/delete`,
        data
      })
    },

  }
}